Libraries ————————————————————————————————

library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5     v purrr   0.3.4
## v tibble  3.1.5     v dplyr   1.0.7
## v tidyr   1.1.4     v stringr 1.4.0
## v readr   2.0.2     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(ggplot2)
library(dplyr)
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
library(lubridate)
## 
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
library(sf)
## Linking to GEOS 3.9.1, GDAL 3.2.1, PROJ 7.2.1
library(raster)
## Loading required package: sp
## 
## Attaching package: 'raster'
## The following object is masked from 'package:dplyr':
## 
##     select
library(ggplot2)
library(incidence)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:raster':
## 
##     select
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout

Read the main police incident database

#
police_incident <- read_csv("Police_Incident_Data.csv")
## Rows: 419836 Columns: 19
## -- Column specification --------------------------------------------------------
## Delimiter: ","
## chr (16): Address, City, State, Zip, Date_Incident, Jurisdiction, Incident_T...
## dbl  (3): Latitude, Longitude, citydst
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(police_incident)
## # A tibble: 6 x 19
##   Address     City   State Zip   Date_Incident Jurisdiction Incident_Tract Zone 
##   <chr>       <chr>  <chr> <chr> <chr>         <chr>        <chr>          <chr>
## 1 1200 BROAD~ Chatt~ TN    3740~ 01/01/2015 1~ TN0330100    A9             Adam~
## 2 500 W 12TH~ Chatt~ TN    3740~ 01/01/2015 1~ TN0330100    A6             Adam~
## 3 1000 Sheri~ Chatt~ TN    3740~ 01/01/2015 1~ TN0330100    B3             Bake~
## 4 1600 OAK ST Chatt~ TN    3740~ 01/01/2015 1~ TN0330100    B4             Bake~
## 5 4000 Blanc~ Chatt~ TN    3741~ 01/01/2015 1~ TN0330100    C2             Char~
## 6 8300 Grind~ CHATT~ TN    3742~ 01/01/2015 1~ TN0330100    C7             Char~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>

Read the tract populations dataframe

censusPopData <- read_csv('Census_2020_Tract_Populations.csv')
## Rows: 1701 Columns: 26
## -- Column specification --------------------------------------------------------
## Delimiter: ","
## chr  (4): County FIPS Code, Census Tract, Common Name, geometry
## dbl (22): State FIPS Code, GeoID, Total Population, Population of One Race, ...
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(censusPopData)
## # A tibble: 6 x 26
##   `State FIPS Code` `County FIPS Code` `Census Tract`       GeoID `Common Name` 
##               <dbl> <chr>              <chr>                <dbl> <chr>         
## 1                47 175                925200         47175925200 Census Tract ~
## 2                47 175                925000         47175925000 Census Tract ~
## 3                47 003                950201         47003950201 Census Tract ~
## 4                47 003                950202         47003950202 Census Tract ~
## 5                47 093                003300         47093003300 Census Tract ~
## 6                47 093                002100         47093002100 Census Tract ~
## # ... with 21 more variables: Total Population <dbl>,
## #   Population of One Race <dbl>, White Alone <dbl>,
## #   Black or African American Alone <dbl>,
## #   American Indian and Alaska Native Alone <dbl>, Asian Alone <dbl>,
## #   Native Hawaiian and Other Pacific Islander Alone <dbl>,
## #   Some Other Race Alone <dbl>, Population of Two or More Races <dbl>,
## #   Hispanic or Latino <dbl>, Not Hispanic or Latino <dbl>, geometry <chr>, ...
colnames(censusPopData)[3] <- "TRACT_ID"

Make a DataFrame for Income data

censusIncData <- read_csv('2020_Median_Income.csv')
## Rows: 82 Columns: 7
## -- Column specification --------------------------------------------------------
## Delimiter: ","
## chr (3): COUNTY_FIP, TRACT_ID, geom
## dbl (1): STATE_FIP
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(censusIncData)
## # A tibble: 6 x 7
##   STATE_FIP COUNTY_FIP TRACT_ID `Median Income` `Median Income Male`
##       <dbl> <chr>      <chr>              <dbl>                <dbl>
## 1        47 065        001300             17175                19924
## 2        47 065        000400             16360                17588
## 3        47 065        010502             27248                37325
## 4        47 065        002400             15523                15567
## 5        47 065        010432             40555                55556
## 6        47 065        011600             22442                24060
## # ... with 2 more variables: Median Income Female <dbl>, geom <chr>

Merge the income and population data by Tract ID

#

censusData <- merge(censusPopData,censusIncData,by="TRACT_ID")

head(censusData)
##   TRACT_ID State FIPS Code County FIPS Code      GeoID    Common Name
## 1   000400              47              113 4.7113e+10 Census Tract 4
## 2   000400              47              065 4.7065e+10 Census Tract 4
## 3   000400              47              141 4.7141e+10 Census Tract 4
## 4   000400              47              157 4.7157e+10 Census Tract 4
## 5   000600              47              065 4.7065e+10 Census Tract 6
## 6   000600              47              113 4.7113e+10 Census Tract 6
##   Total Population Population of One Race White Alone
## 1             3603                   3494         717
## 2             3002                   2914         334
## 3             4186                   3964        3688
## 4             1350                   1319          15
## 5             3620                   3429        3193
## 6             1833                   1751         752
##   Black or African American Alone American Indian and Alaska Native Alone
## 1                            2672                                      10
## 2                            2513                                      10
## 3                              63                                      33
## 4                            1299                                       2
## 5                              97                                      12
## 6                             976                                       0
##   Asian Alone Native Hawaiian and Other Pacific Islander Alone
## 1          15                                                0
## 2          12                                                0
## 3          72                                                1
## 4           0                                                0
## 5          72                                                0
## 6           3                                                2
##   Some Other Race Alone Population of Two or More Races Hispanic or Latino
## 1                    80                             109                116
## 2                    45                              88                 81
## 3                   107                             222                231
## 4                     3                              31                 16
## 5                    55                             191                131
## 6                    18                              82                 54
##   Not Hispanic or Latino
## 1                   3487
## 2                   2921
## 3                   3955
## 4                   1334
## 5                   3489
## 6                   1779
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  geometry
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                               MULTIPOLYGON (((-88.829315 35.650253, -88.829315 35.650307, -88.82931 35.65038, -88.82929 35.650482, -88.82928 35.65057, -88.829254 35.650723, -88.829216 35.650887, -88.82907 35.650852, -88.82879 35.65078, -88.82873 35.650764, -88.828705 35.650757, -88.82811 35.65058, -88.827614 35.650436, -88.8273 35.65032, -88.82723 35.650284, -88.82708 35.650215, -88.826775 35.650063, -88.82645 35.64988, -88.82599 35.649647, -88.825935 35.64962, -88.82567 35.6495, -88.82551 35.64944, -88.82524 35.64935, -88.82489 35.649254, -88.82472 35.64922, -88.82439 35.64917, -88.823746 35.64911, -88.82323 35.649063, -88.82159 35.64889, -88.82113 35.648838, -88.8207 35.648804, -88.82025 35.648766, -88.82006 35.648746, -88.81942 35.64868, -88.81847 35.648594, -88.818214 35.648582, -88.81807 35.64858, -88.818016 35.64858, -88.81769 35.648598, -88.81738 35.64864, -88.81719 35.64867, -88.81694 35.648727, -88.81673 35.648792, -88.816536 35.648857, -88.81642 35.648903, -88.8163 35.64896, -88.81608 35.64906, -88.81601 35.64909, -88.81572 35.649227, -88.81545 35.649364, -88.81532 35.649426, -88.81515 35.649498, -88.81509 35.649517, -88.81493 35.649567, -88.814804 35.649605, -88.814606 35.64965, -88.81441 35.64968, -88.81408 35.649708, -88.81372 35.64971, -88.813614 35.649708, -88.813194 35.649685, -88.81281 35.649673, -88.812675 35.64967, -88.81224 35.649635, -88.811584 35.649567, -88.81101 35.649483, -88.81094 35.649467, -88.81051 35.64939, -88.809944 35.64929, -88.809685 35.649242, -88.80877 35.649075, -88.80825 35.64899, -88.80807 35.64896, -88.807686 35.64891, -88.80731 35.64886, -88.8073 35.64886, -88.80678 35.648808, -88.8063 35.648773, -88.80614 35.648766, -88.80581 35.648746, -88.80575 35.648746, -88.80526 35.648727, -88.804344 35.648697, -88.80411 35.648697, -88.8038 35.64869, -88.80362 35.648685, -88.803314 35.64867, -88.803085 35.64866, -88.802956 35.64865, -88.802505 35.648643, -88.80239 35.648643, -88.802124 35.648643, -88.80186 35.64865, -88.80123 35.648624, -88.80104 35.64862, -88.80027 35.648598, -88.79839 35.648563, -88.79785 35.648537, -88.7977 35.64853, -88.79717 35.6485, -88.796585 35.64846, -88.79622 35.648438, -88.795135 35.648373, -88.79477 35.64835, -88.79424 35.64834, -88.79423 35.64834, -88.794106 35.64834, -88.793976 35.64835, -88.79344 35.64841, -88.7926 35.648495, -88.792404 35.648518, -88.79205 35.648537, -88.79208 35.64779, -88.79212 35.647266, -88.79212 35.646946, -88.792145 35.646694, -88.79219 35.646275, -88.79225 35.64595, -88.79235 35.64551, -88.79244 35.6452, -88.79264 35.644527, -88.79278 35.644028, -88.792915 35.64361, -88.79305 35.643253, -88.79325 35.64282, -88.79349 35.6424, -88.79371 35.642025, -88.79407 35.641537, -88.79445 35.64102, -88.795685 35.639465, -88.79624 35.63884, -88.796684 35.638363, -88.79707 35.63797, -88.79756 35.637527, -88.79823 35.636936, -88.79907 35.63634, -88.801544 35.634678, -88.80498 35.632355, -88.80497 35.63238, -88.80499 35.63239, -88.80507 35.63241, -88.804924 35.63267, -88.80422 35.63406, -88.80396 35.634575, -88.803986 35.63458, -88.80418 35.6346, -88.80489 35.634655, -88.80534 35.63469, -88.80582 35.634716, -88.80671 35.63478, -88.80703 35.63481, -88.80768 35.634857, -88.807846 35.634872, -88.808075 35.63489, -88.80818 35.634895, -88.80853 35.634853, -88.80859 35.63484, -88.8086 35.634834, -88.80863 35.63483, -88.808685 35.634834, -88.808716 35.63484, -88.80875 35.634842, -88.808754 35.63483, -88.808784 35.634796, -88.80879 35.634785, -88.80883 35.634796, -88.80886 35.634804, -88.80905 35.6348, -88.80917 35.6348, -88.80926 35.634804, -88.80956 35.63483, -88.809715 35.63484, -88.81032 35.634857, -88.8107 35.634872, -88.81095 35.63488, -88.81141 35.634895, -88.811714 35.634907, -88.811966 35.634914, -88.81214 35.63492, -88.81266 35.634933, -88.81283 35.63494, -88.81433 35.634987, -88.81493 35.635006, -88.81574 35.63503, -88.81598 35.635033, -88.8167 35.63505, -88.81694 35.63506, -88.817444 35.63507, -88.81801 35.635082, -88.8184 35.63509, -88.818695 35.63511, -88.81894 35.635117, -88.81934 35.635128, -88.819435 35.635124, -88.819595 35.63511, -88.81971 35.6351, -88.819984 35.635105, -88.82007 35.63511, -88.82022 35.63512, -88.82047 35.63513, -88.82086 35.635155, -88.82122 35.635166, -88.82147 35.635174, -88.82184 35.635185, -88.82204 35.635193, -88.822464 35.635197, -88.82289 35.635216, -88.82294 35.635216, -88.8233 35.635242, -88.82337 35.635254, -88.823586 35.635292, -88.823654 35.635303, -88.82384 35.63534, -88.82412 35.635395, -88.82424 35.635406, -88.8244 35.63541, -88.82459 35.635414, -88.824905 35.635418, -88.82552 35.635426, -88.82583 35.635433, -88.82604 35.63544, -88.82614 35.635452, -88.82612 35.636066, -88.82611 35.636288, -88.8261 35.636734, -88.82607 35.63741, -88.826004 35.637905, -88.825966 35.638165, -88.82594 35.63839, -88.82593 35.638435, -88.82589 35.638504, -88.82629 35.638702, -88.8266 35.63885, -88.82686 35.638977, -88.82712 35.63911, -88.82721 35.639168, -88.82734 35.63926, -88.8274 35.6393, -88.82746 35.63935, -88.82749 35.639378, -88.82763 35.63951, -88.827736 35.63962, -88.827805 35.639706, -88.82788 35.639812, -88.82794 35.63992, -88.82797 35.639988, -88.82799 35.64001, -88.828026 35.640114, -88.828064 35.640247, -88.828094 35.64037, -88.82812 35.640568, -88.828125 35.640602, -88.82822 35.64123, -88.82823 35.64128, -88.82824 35.641323, -88.8283 35.641716, -88.82834 35.641933, -88.828384 35.642162, -88.82843 35.642464, -88.82847 35.64269, -88.8285 35.642933, -88.828514 35.64312, -88.82852 35.64319, -88.82859 35.644127, -88.8286 35.64423, -88.828606 35.64434, -88.828636 35.644875, -88.82865 35.645077, -88.82865 35.645107, -88.82869 35.64577, -88.82871 35.646133, -88.828735 35.646484, -88.82874 35.646618, -88.828766 35.646976, -88.82881 35.647358, -88.82888 35.64776, -88.828926 35.64796, -88.829025 35.64842, -88.82907 35.648598, -88.82909 35.648663, -88.82914 35.648895, -88.8292 35.649193, -88.82922 35.649296, -88.82925 35.649433, -88.82927 35.649612, -88.82928 35.649654, -88.82931 35.65, -88.829315 35.650135, -88.829315 35.650253)))
## 2 MULTIPOLYGON (((-85.29729 35.051086, -85.29727 35.051098, -85.2966 35.051376, -85.29657 35.051395, -85.29635 35.05153, -85.29524 35.05197, -85.29498 35.052055, -85.29474 35.05212, -85.29443 35.052177, -85.2939 35.052227, -85.2912 35.052235, -85.28961 35.05224, -85.2891 35.052258, -85.288864 35.052288, -85.288795 35.052296, -85.288574 35.05234, -85.28818 35.052464, -85.28782 35.052612, -85.28756 35.052757, -85.28741 35.052856, -85.28723 35.052967, -85.28702 35.053104, -85.286446 35.053486, -85.28608 35.053726, -85.286 35.053776, -85.285576 35.05405, -85.28546 35.054115, -85.28523 35.054226, -85.28491 35.054344, -85.2842 35.054592, -85.28397 35.05471, -85.28389 35.05478, -85.28361 35.054855, -85.283035 35.05505, -85.28087 35.055794, -85.2791 35.056396, -85.27853 35.05661, -85.27837 35.056675, -85.277916 35.05689, -85.27754 35.057095, -85.27732 35.057243, -85.27711 35.057384, -85.27657 35.05782, -85.27575 35.058548, -85.27544 35.05838, -85.27537 35.058342, -85.27505 35.058174, -85.274216 35.057747, -85.27407 35.05768, -85.27383 35.057552, -85.2737 35.057484, -85.27359 35.05743, -85.27336 35.05732, -85.27331 35.057293, -85.27326 35.05727, -85.27318 35.057228, -85.2731 35.057186, -85.2729 35.057083, -85.272804 35.05703, -85.27277 35.057014, -85.272514 35.056885, -85.27201 35.056625, -85.27179 35.05651, -85.271675 35.056454, -85.27157 35.0564, -85.27151 35.05637, -85.27135 35.056286, -85.2713 35.056263, -85.27087 35.05604, -85.27078 35.056, -85.27046 35.055866, -85.27042 35.055847, -85.27014 35.05576, -85.26991 35.055714, -85.26947 35.05566, -85.26927 35.05564, -85.26899 35.055588, -85.26917 35.055264, -85.269196 35.05523, -85.26931 35.055115, -85.269485 35.054977, -85.26964 35.05489, -85.2698 35.05483, -85.270164 35.054752, -85.27018 35.05475, -85.270546 35.054657, -85.27051 35.054565, -85.270386 35.05429, -85.270355 35.054237, -85.270355 35.0542, -85.27025 35.05416, -85.269936 35.05405, -85.26984 35.054012, -85.26979 35.053993, -85.26965 35.053944, -85.26961 35.053925, -85.26937 35.053837, -85.26868 35.053574, -85.26844 35.053486, -85.26831 35.053436, -85.267914 35.053288, -85.267784 35.053238, -85.26776 35.05323, -85.26756 35.053154, -85.26737 35.05308, -85.266785 35.052868, -85.266594 35.052795, -85.266426 35.05273, -85.265915 35.05254, -85.26575 35.052475, -85.26555 35.052402, -85.26497 35.05219, -85.26477 35.052116, -85.26463 35.052067, -85.264206 35.051907, -85.26406 35.051853, -85.2639 35.051792, -85.26343 35.05161, -85.26333 35.05157, -85.26327 35.05155, -85.26321 35.05153, -85.262955 35.051437, -85.26272 35.05135, -85.26204 35.05109, -85.261734 35.050976, -85.26181 35.050854, -85.26183 35.050816, -85.2621 35.050327, -85.26219 35.050163, -85.26228 35.05, -85.26256 35.049507, -85.26265 35.049343, -85.26273 35.049194, -85.26273 35.049183, -85.262825 35.049026, -85.26299 35.04871, -85.26308 35.04855, -85.26313 35.0484, -85.26315 35.048336, -85.26319 35.048115, -85.26319 35.047935, -85.26319 35.04778, -85.26318 35.047546, -85.26316 35.047, -85.26317 35.04685, -85.26317 35.046818, -85.26322 35.046623, -85.263245 35.04656, -85.26333 35.046383, -85.26336 35.046326, -85.26341 35.046223, -85.26359 35.04591, -85.26365 35.045807, -85.26372 35.045685, -85.263916 35.045322, -85.263985 35.0452, -85.2641 35.044987, -85.26416 35.04489, -85.26433 35.04456, -85.2644 35.044353, -85.26444 35.04405, -85.26444 35.044018, -85.26445 35.04394, -85.26448 35.043793, -85.26453 35.04366, -85.26458 35.04353, -85.26493 35.042885, -85.265076 35.04263, -85.26522 35.042362, -85.26566 35.04157, -85.26581 35.0413, -85.26583 35.04126, -85.26588 35.04118, -85.26608 35.04081, -85.26615 35.040688, -85.266335 35.04036, -85.266884 35.03937, -85.26707 35.03904, -85.26724 35.03911, -85.26727 35.03912, -85.26745 35.039185, -85.26778 35.03932, -85.26796 35.039394, -85.26821 35.03949, -85.26853 35.039616, -85.26897 35.039776, -85.269226 35.03987, -85.26951 35.039978, -85.27036 35.040295, -85.27065 35.0404, -85.27092 35.040493, -85.27112 35.04056, -85.27132 35.040634, -85.27172 35.04078, -85.27199 35.04088, -85.272125 35.040928, -85.27236 35.04102, -85.27255 35.04109, -85.27269 35.041145, -85.272835 35.0412, -85.27327 35.041363, -85.273415 35.041416, -85.27357 35.041473, -85.27403 35.04165, -85.274185 35.041706, -85.27433 35.04176, -85.27477 35.041924, -85.27492 35.041977, -85.275116 35.04205, -85.275665 35.042255, -85.27572 35.042274, -85.27589 35.042336, -85.275925 35.04235, -85.276054 35.042397, -85.27646 35.042545, -85.276596 35.0426, -85.27673 35.042645, -85.27714 35.04279, -85.277275 35.04284, -85.27741 35.04289, -85.27782 35.043034, -85.277954 35.043083, -85.27822 35.043182, -85.27904 35.043484, -85.27928 35.04357, -85.279305 35.043583, -85.27943 35.04363, -85.27953 35.04367, -85.27978 35.04375, -85.2799 35.043793, -85.27992 35.0438, -85.28 35.043827, -85.28003 35.04384, -85.28006 35.04385, -85.28061 35.044056, -85.28091 35.04417, -85.28103 35.04422, -85.28209 35.044617, -85.28236 35.044712, -85.2827 35.04484, -85.282936 35.04493, -85.28295 35.044933, -85.283 35.04495, -85.28301 35.044956, -85.283066 35.044975, -85.28316 35.04501, -85.2832 35.045025, -85.28334 35.045074, -85.28339 35.045094, -85.28344 35.045113, -85.28356 35.04516, -85.28361 35.045174, -85.28375 35.04523, -85.2841 35.045357, -85.28438 35.04546, -85.28514 35.045742, -85.28549 35.04587, -85.285736 35.04596, -85.28621 35.046135, -85.286476 35.046234, -85.28672 35.046326, -85.286736 35.046303, -85.28687 35.046383, -85.28689 35.04639, -85.28715 35.046497, -85.28722 35.046528, -85.28787 35.04678, -85.28794 35.046803, -85.288216 35.046894, -85.28829 35.046776, -85.28832 35.046715, -85.28862 35.04617, -85.28872 35.045986, -85.28918 35.04616, -85.289444 35.046265, -85.29055 35.046684, -85.29101 35.046856, -85.29128 35.04696, -85.292114 35.04727, -85.29239 35.047375, -85.29259 35.047443, -85.29264 35.047462, -85.29337 35.047733, -85.29362 35.047825, -85.29352 35.048008, -85.29323 35.048553, -85.29313 35.048737, -85.29322 35.04878, -85.29336 35.04884, -85.293495 35.048923, -85.29359 35.04898, -85.29375 35.049103, -85.29378 35.04912, -85.294 35.049274, -85.29415 35.049377, -85.29427 35.04943, -85.29446 35.04952, -85.294655 35.0496, -85.29477 35.049644, -85.2956 35.049957, -85.29572 35.050003, -85.29604 35.050125, -85.29609 35.050186, -85.296104 35.05021, -85.29633 35.0504, -85.29636 35.05042, -85.296524 35.050545, -85.29679 35.05072, -85.29696 35.050804, -85.2972 35.05089, -85.297516 35.05096, -85.29729 35.051086)))
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          MULTIPOLYGON (((-85.50459 36.16861, -85.50457 36.168667, -85.50441 36.169132, -85.50438 36.169235, -85.50435 36.169304, -85.50428 36.169502, -85.50407 36.170097, -85.50402 36.170235, -85.504 36.1703, -85.50395 36.170406, -85.50391 36.170555, -85.50364 36.171337, -85.50356 36.171566, -85.503555 36.1716, -85.50354 36.171658, -85.50349 36.171795, -85.503456 36.17189, -85.50325 36.172554, -85.503204 36.172634, -85.50314 36.172707, -85.50311 36.172726, -85.50309 36.172745, -85.50303 36.172775, -85.502914 36.172813, -85.50287 36.172825, -85.502846 36.172855, -85.50282 36.172855, -85.502754 36.172863, -85.50274 36.172867, -85.50275 36.1729, -85.50264 36.173172, -85.50231 36.17399, -85.502205 36.17426, -85.50193 36.17504, -85.50176 36.175533, -85.501564 36.17611, -85.50145 36.176247, -85.5008 36.17704, -85.50067 36.17712, -85.49998 36.17756, -85.49957 36.177692, -85.498375 36.17809, -85.49798 36.178223, -85.49774 36.178303, -85.49703 36.178543, -85.49678 36.17863, -85.49649 36.178726, -85.495575 36.17903, -85.49527 36.17913, -85.49504 36.179207, -85.49435 36.179432, -85.49412 36.17951, -85.49379 36.17962, -85.49372 36.17964, -85.492805 36.17995, -85.49248 36.180065, -85.49148 36.180397, -85.49128 36.18046, -85.48847 36.181396, -85.48747 36.181732, -85.48616 36.18217, -85.48222 36.183483, -85.48091 36.18392, -85.48078 36.183968, -85.480736 36.183983, -85.4804 36.184097, -85.48034 36.184116, -85.48027 36.18414, -85.47933 36.184452, -85.47683 36.185287, -85.47653 36.185387, -85.4756 36.1857, -85.47474 36.185986, -85.47415 36.186184, -85.472755 36.18665, -85.47187 36.186947, -85.47 36.18757, -85.46831 36.18812, -85.46781 36.18827, -85.46652 36.18871, -85.46462 36.18932, -85.4635 36.189705, -85.46326 36.189762, -85.46194 36.19021, -85.46162 36.190334, -85.461624 36.19024, -85.46164 36.19016, -85.461655 36.19001, -85.46167 36.189816, -85.4617 36.18959, -85.46174 36.189224, -85.46194 36.18739, -85.462 36.186913, -85.46204 36.186462, -85.462074 36.186188, -85.46216 36.185463, -85.46218 36.185177, -85.46226 36.18448, -85.462296 36.183804, -85.46229 36.183598, -85.46226 36.18314, -85.46223 36.182926, -85.46217 36.18255, -85.46205 36.18181, -85.46198 36.181416, -85.46181 36.180344, -85.46179 36.180267, -85.46178 36.18016, -85.461716 36.17982, -85.46171 36.179768, -85.46149 36.178417, -85.461426 36.17804, -85.46133 36.177464, -85.46125 36.177006, -85.46113 36.176292, -85.46102 36.17564, -85.46098 36.17544, -85.460945 36.175186, -85.4609 36.174885, -85.46086 36.17466, -85.460815 36.174194, -85.46081 36.173977, -85.4608 36.173817, -85.4608 36.17367, -85.46081 36.173496, -85.46084 36.17301, -85.46089 36.172684, -85.46094 36.172424, -85.460976 36.17224, -85.461006 36.172127, -85.461075 36.171864, -85.46109 36.171833, -85.46122 36.171444, -85.4614 36.17101, -85.46153 36.17073, -85.46175 36.170334, -85.46211 36.169743, -85.46299 36.168427, -85.463264 36.16801, -85.46352 36.167625, -85.46372 36.167324, -85.46378 36.167217, -85.46403 36.16723, -85.46411 36.167233, -85.46446 36.167248, -85.46471 36.16726, -85.46622 36.167328, -85.467476 36.16734, -85.467575 36.16734, -85.4684 36.167336, -85.46924 36.167316, -85.46968 36.167305, -85.47053 36.16725, -85.47113 36.167194, -85.471306 36.167175, -85.47173 36.16711, -85.472565 36.16699, -85.47271 36.16697, -85.47296 36.166927, -85.473595 36.16683, -85.47417 36.16674, -85.47457 36.166683, -85.474846 36.16665, -85.47567 36.166546, -85.475945 36.16651, -85.476105 36.16649, -85.47659 36.166428, -85.47675 36.16641, -85.476944 36.166386, -85.477516 36.166317, -85.47771 36.166294, -85.4778 36.16628, -85.47808 36.166237, -85.47817 36.166225, -85.4783 36.16647, -85.47841 36.166637, -85.478516 36.166786, -85.478584 36.166897, -85.47912 36.167656, -85.47924 36.16792, -85.479416 36.16846, -85.47944 36.168514, -85.47958 36.16889, -85.47968 36.16913, -85.47976 36.16911, -85.4803 36.169125, -85.48101 36.169144, -85.48159 36.169178, -85.482155 36.16922, -85.48277 36.16927, -85.48333 36.16931, -85.48352 36.169327, -85.48474 36.16942, -85.485016 36.16944, -85.48558 36.16949, -85.48571 36.169502, -85.48611 36.169537, -85.48624 36.16955, -85.48633 36.169556, -85.48646 36.169544, -85.48714 36.1695, -85.487366 36.169483, -85.48753 36.169453, -85.4876 36.169434, -85.48782 36.169376, -85.4883 36.16925, -85.4884 36.169224, -85.48853 36.169205, -85.48864 36.169186, -85.48876 36.169186, -85.4891 36.169197, -85.48941 36.16922, -85.48963 36.16924, -85.48986 36.16926, -85.490036 36.169277, -85.490166 36.16929, -85.49052 36.16933, -85.49055 36.16933, -85.490776 36.169353, -85.49116 36.16938, -85.491455 36.169407, -85.492226 36.16948, -85.492294 36.169487, -85.49235 36.169495, -85.492676 36.16954, -85.49304 36.16958, -85.49415 36.169697, -85.49445 36.169727, -85.49452 36.16973, -85.49474 36.16975, -85.49542 36.169815, -85.49549 36.169823, -85.49565 36.16984, -85.49612 36.169888, -85.49642 36.169918, -85.49701 36.169968, -85.49751 36.170017, -85.49798 36.170067, -85.49805 36.170074, -85.498024 36.170197, -85.498276 36.170223, -85.49923 36.170334, -85.49955 36.17037, -85.49969 36.17038, -85.50007 36.17042, -85.50011 36.170425, -85.500175 36.170437, -85.500244 36.17044, -85.50054 36.170383, -85.50068 36.17036, -85.500984 36.1703, -85.50138 36.17023, -85.50145 36.17022, -85.501755 36.170162, -85.50163 36.169792, -85.501595 36.169666, -85.50156 36.169533, -85.501526 36.169445, -85.50129 36.168697, -85.50128 36.168682, -85.501274 36.168633, -85.5012 36.1684, -85.50119 36.168354, -85.501175 36.168312, -85.50127 36.168297, -85.50145 36.168304, -85.501915 36.168324, -85.50229 36.168343, -85.50241 36.168346, -85.50257 36.168354, -85.50271 36.16836, -85.50312 36.168377, -85.50326 36.168385, -85.50345 36.168392, -85.504036 36.16842, -85.504234 36.168427, -85.50432 36.16843, -85.50433 36.16843, -85.50457 36.168434, -85.504654 36.168438, -85.50459 36.16861)))
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MULTIPOLYGON (((-90.02512 35.16874, -90.02509 35.169693, -90.02506 35.17103, -90.02505 35.17179, -90.02504 35.171925, -90.02503 35.172325, -90.02503 35.17246, -90.025024 35.172607, -90.02502 35.17305, -90.02501 35.1732, -90.025 35.17347, -90.02499 35.174286, -90.02498 35.174557, -90.02485 35.17455, -90.02446 35.17453, -90.02433 35.174522, -90.02427 35.175426, -90.02424 35.17627, -90.02414 35.17813, -90.02413 35.17834, -90.0241 35.179035, -90.02406 35.17957, -90.02406 35.179585, -90.024025 35.17985, -90.023994 35.18049, -90.02401 35.18057, -90.02402 35.180603, -90.02405 35.180683, -90.0241 35.180744, -90.02425 35.180836, -90.02441 35.180866, -90.02447 35.180866, -90.024506 35.180866, -90.024605 35.180893, -90.0247 35.180973, -90.02472 35.18101, -90.02472 35.181236, -90.02472 35.18131, -90.02471 35.18152, -90.02471 35.18159, -90.024666 35.18169, -90.02452 35.181995, -90.024475 35.182095, -90.0242 35.18215, -90.02338 35.18232, -90.0231 35.182377, -90.022 35.182713, -90.02164 35.182823, -90.020805 35.18312, -90.01964 35.183853, -90.019 35.184334, -90.01842 35.184776, -90.01807 35.184994, -90.01804 35.18501, -90.01798 35.18505, -90.01796 35.185066, -90.01796 35.185116, -90.01796 35.185383, -90.01796 35.186054, -90.01795 35.18634, -90.01795 35.18666, -90.01795 35.18668, -90.01795 35.18674, -90.01795 35.18676, -90.01793 35.186756, -90.01787 35.18674, -90.017845 35.186737, -90.01701 35.18675, -90.01577 35.186737, -90.01529 35.186737, -90.01504 35.18674, -90.01392 35.186344, -90.01325 35.186356, -90.01191 35.18686, -90.01003 35.18725, -90.009315 35.1874, -90.008514 35.187622, -90.008095 35.18772, -90.008095 35.187645, -90.008095 35.18749, -90.0081 35.18727, -90.0081 35.187256, -90.00813 35.186214, -90.0082 35.182365, -90.00821 35.182262, -90.00821 35.18192, -90.008224 35.181217, -90.00831 35.178116, -90.00831 35.178078, -90.00834 35.177032, -90.00835 35.17677, -90.00835 35.17676, -90.00837 35.175976, -90.00838 35.175713, -90.008385 35.175438, -90.0084 35.17461, -90.00841 35.174335, -90.008415 35.17408, -90.008446 35.173306, -90.00845 35.173084, -90.00845 35.173046, -90.00846 35.172974, -90.00847 35.172787, -90.00847 35.17272, -90.00885 35.172733, -90.00946 35.17276, -90.009995 35.17276, -90.010376 35.17276, -90.010666 35.17277, -90.01075 35.17277, -90.011536 35.172775, -90.011826 35.17278, -90.01214 35.172714, -90.01224 35.172688, -90.0126 35.172592, -90.01308 35.17246, -90.01345 35.172337, -90.01355 35.172306, -90.013855 35.172195, -90.01411 35.1721, -90.01487 35.171814, -90.01513 35.17172, -90.01538 35.171623, -90.01615 35.171333, -90.0164 35.171238, -90.01667 35.17114, -90.01718 35.17095, -90.01747 35.17084, -90.01774 35.170742, -90.01793 35.17067, -90.01836 35.17051, -90.01838 35.1705, -90.01845 35.17048, -90.01853 35.17045, -90.01864 35.170406, -90.018974 35.170288, -90.01909 35.170246, -90.01921 35.1702, -90.01954 35.170082, -90.0196 35.17006, -90.01964 35.170048, -90.01973 35.170013, -90.01981 35.16998, -90.02004 35.16989, -90.020096 35.169876, -90.02019 35.169846, -90.02049 35.169743, -90.02072 35.169666, -90.021385 35.16941, -90.02168 35.169296, -90.02183 35.16924, -90.02228 35.16907, -90.02243 35.169014, -90.0229 35.168835, -90.023964 35.168434, -90.02404 35.168407, -90.02406 35.1684, -90.024864 35.16809, -90.02515 35.167976, -90.02512 35.16874)))
## 5                                                                                                                                                                                    MULTIPOLYGON (((-85.30923 35.058823, -85.30905 35.059742, -85.30901 35.059914, -85.30899 35.06005, -85.30889 35.06057, -85.30868 35.061672, -85.30859 35.062122, -85.30852 35.062553, -85.30852 35.06264, -85.30856 35.062984, -85.30857 35.063038, -85.308815 35.064213, -85.30886 35.064404, -85.30891 35.0646, -85.30895 35.064762, -85.309 35.06495, -85.309044 35.065247, -85.309044 35.06526, -85.30906 35.065414, -85.30906 35.065422, -85.30906 35.06552, -85.30906 35.065777, -85.30907 35.06654, -85.309074 35.066795, -85.309044 35.067093, -85.30902 35.06743, -85.30896 35.067986, -85.30893 35.068283, -85.30889 35.06866, -85.30878 35.06979, -85.30874 35.070168, -85.308716 35.070385, -85.3087 35.07055, -85.30874 35.070614, -85.30871 35.070957, -85.3087 35.071026, -85.30868 35.071243, -85.30858 35.071404, -85.30851 35.071514, -85.30845 35.07158, -85.30836 35.071655, -85.30816 35.07178, -85.308105 35.071815, -85.308 35.071877, -85.307915 35.071953, -85.307526 35.072166, -85.30741 35.072227, -85.30722 35.072315, -85.30696 35.07243, -85.30669 35.07255, -85.30634 35.07271, -85.30618 35.07281, -85.3061 35.07289, -85.30602 35.073, -85.305885 35.07326, -85.30582 35.07341, -85.30565 35.073757, -85.30537 35.07434, -85.30527 35.074474, -85.30523 35.074528, -85.30489 35.074936, -85.30475 35.075134, -85.304634 35.07533, -85.30458 35.075424, -85.304405 35.07576, -85.30427 35.075912, -85.30414 35.076015, -85.30394 35.076122, -85.30285 35.076523, -85.30272 35.076576, -85.30258 35.076656, -85.30253 35.07669, -85.30236 35.07685, -85.30224 35.077007, -85.30217 35.077133, -85.302124 35.077286, -85.30208 35.07748, -85.30207 35.07753, -85.30205 35.07755, -85.30199 35.077606, -85.30198 35.077656, -85.301834 35.077656, -85.30144 35.07765, -85.30133 35.07764, -85.30124 35.077618, -85.30116 35.0776, -85.301 35.077526, -85.30092 35.077473, -85.300804 35.077377, -85.30069 35.077225, -85.30048 35.076828, -85.30042 35.076702, -85.30026 35.076397, -85.30023 35.076332, -85.30018 35.076206, -85.30015 35.07614, -85.300095 35.075974, -85.30001 35.07569, -85.29998 35.07551, -85.299965 35.075424, -85.29996 35.075195, -85.29997 35.07509, -85.30014 35.073345, -85.30016 35.07315, -85.30005 35.072994, -85.3 35.07295, -85.29989 35.07287, -85.29981 35.072834, -85.29977 35.07282, -85.29966 35.072792, -85.29957 35.07278, -85.29921 35.07276, -85.29865 35.072735, -85.29814 35.072666, -85.29788 35.072605, -85.29777 35.072563, -85.297646 35.072502, -85.29756 35.07246, -85.29707 35.072186, -85.2969 35.07207, -85.29659 35.07187, -85.2964 35.071716, -85.296394 35.07171, -85.296265 35.07155, -85.29617 35.07139, -85.295906 35.070908, -85.29589 35.070877, -85.29583 35.070744, -85.29571 35.070396, -85.29565 35.070236, -85.295616 35.07016, -85.295334 35.069363, -85.29521 35.06902, -85.29515 35.06885, -85.294975 35.06835, -85.294914 35.068184, -85.29492 35.068073, -85.29494 35.067898, -85.29493 35.06775, -85.294914 35.067642, -85.294914 35.067516, -85.29491 35.06748, -85.29492 35.06736, -85.294975 35.06725, -85.29504 35.067173, -85.29511 35.067074, -85.29514 35.067017, -85.295166 35.0669, -85.29516 35.066837, -85.29515 35.066784, -85.29512 35.06669, -85.295044 35.06657, -85.29495 35.066486, -85.2948 35.066418, -85.29466 35.066364, -85.29444 35.066273, -85.29416 35.066154, -85.293755 35.06599, -85.29332 35.06582, -85.29304 35.06571, -85.29295 35.06554, -85.29283 35.0653, -85.29271 35.065044, -85.292656 35.06494, -85.29261 35.064884, -85.2924 35.064957, -85.29176 35.065178, -85.29155 35.065254, -85.29117 35.065384, -85.29003 35.065777, -85.28965 35.065907, -85.289566 35.06572, -85.28946 35.065483, -85.28931 35.06515, -85.28923 35.064987, -85.28921 35.064976, -85.289154 35.064976, -85.288956 35.065067, -85.288635 35.065216, -85.28845 35.06533, -85.28826 35.065475, -85.28805 35.065643, -85.287926 35.06572, -85.287766 35.06583, -85.28773 35.065853, -85.287575 35.06594, -85.28745 35.066013, -85.287384 35.06594, -85.287315 35.065887, -85.2872 35.065804, -85.28705 35.065723, -85.28682 35.065628, -85.286644 35.065582, -85.28645 35.065357, -85.28627 35.065132, -85.28608 35.064915, -85.286156 35.06486, -85.28625 35.064823, -85.286385 35.064808, -85.28648 35.06478, -85.28655 35.06472, -85.2866 35.064686, -85.28661 35.06462, -85.28662 35.06451, -85.286606 35.064438, -85.28659 35.06438, -85.2866 35.064163, -85.28659 35.064117, -85.286545 35.063915, -85.28651 35.063793, -85.286156 35.062653, -85.28615 35.06255, -85.286354 35.06255, -85.28633 35.062363, -85.28629 35.06205, -85.286476 35.061584, -85.28648 35.06132, -85.286446 35.061234, -85.28641 35.06121, -85.28633 35.06117, -85.2861 35.061096, -85.285866 35.060974, -85.28573 35.06087, -85.28563 35.060684, -85.285576 35.06046, -85.28561 35.060287, -85.28564 35.06021, -85.28573 35.06017, -85.285866 35.06019, -85.28618 35.06043, -85.28627 35.060444, -85.28637 35.06041, -85.28647 35.060318, -85.286446 35.060184, -85.28637 35.06003, -85.286255 35.059917, -85.28593 35.05977, -85.28584 35.05971, -85.28582 35.0596, -85.285904 35.059456, -85.28591 35.059444, -85.286125 35.059246, -85.28638 35.058887, -85.2865 35.058414, -85.28625 35.05849, -85.285904 35.058605, -85.285675 35.058685, -85.28542 35.05876, -85.285255 35.058796, -85.28514 35.058815, -85.285065 35.058823, -85.28495 35.058826, -85.28491 35.05882, -85.28488 35.058807, -85.28485 35.05879, -85.2848 35.058735, -85.28475 35.058666, -85.28465 35.058475, -85.28461 35.058403, -85.28439 35.058147, -85.284 35.057667, -85.284676 35.057213, -85.28487 35.057117, -85.28539 35.056858, -85.28562 35.056744, -85.28618 35.056534, -85.2868 35.056328, -85.287254 35.056213, -85.28742 35.056168, -85.28759 35.056114, -85.28777 35.056053, -85.28792 35.056004, -85.288086 35.055958, -85.288765 35.055786, -85.29009 35.055542, -85.29048 35.05547, -85.294136 35.0556, -85.29549 35.05565, -85.29585 35.055935, -85.29611 35.056084, -85.296776 35.0563, -85.29678 35.05631, -85.29713 35.05634, -85.29771 35.056515, -85.29832 35.05661, -85.29883 35.05676, -85.30004 35.057037, -85.30108 35.05717, -85.3019 35.057274, -85.302536 35.05737, -85.30291 35.057423, -85.30313 35.05747, -85.30396 35.057632, -85.30494 35.0577, -85.30535 35.05773, -85.30554 35.057697, -85.30589 35.057827, -85.306946 35.05821, -85.30726 35.058323, -85.30829 35.05849, -85.30928 35.058514, -85.30923 35.058823)))
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                MULTIPOLYGON (((-88.826385 35.629, -88.82638 35.629044, -88.82635 35.62909, -88.82627 35.629128, -88.82623 35.629158, -88.826225 35.629173, -88.82619 35.629223, -88.82617 35.629253, -88.82616 35.62931, -88.82616 35.629387, -88.82616 35.629498, -88.82617 35.62957, -88.82618 35.629627, -88.826294 35.629925, -88.826324 35.630047, -88.82633 35.630096, -88.82635 35.630276, -88.82636 35.630447, -88.82634 35.630936, -88.826324 35.63108, -88.82631 35.63147, -88.82629 35.631844, -88.82624 35.632835, -88.82623 35.633026, -88.8262 35.633614, -88.826195 35.63381, -88.82619 35.633877, -88.82618 35.634087, -88.82618 35.634155, -88.82617 35.634415, -88.82615 35.635155, -88.82615 35.635193, -88.82614 35.635452, -88.82604 35.63544, -88.82583 35.635433, -88.82552 35.635426, -88.824905 35.635418, -88.82459 35.635414, -88.8244 35.63541, -88.82424 35.635406, -88.82412 35.635395, -88.82384 35.63534, -88.823654 35.635303, -88.823586 35.635292, -88.82337 35.635254, -88.8233 35.635242, -88.82294 35.635216, -88.82289 35.635216, -88.822464 35.635197, -88.82204 35.635193, -88.82184 35.635185, -88.82147 35.635174, -88.82122 35.635166, -88.82086 35.635155, -88.82047 35.63513, -88.82022 35.63512, -88.82007 35.63511, -88.819984 35.635105, -88.81971 35.6351, -88.819595 35.63511, -88.819435 35.635124, -88.81934 35.635128, -88.81894 35.635117, -88.818695 35.63511, -88.8184 35.63509, -88.81801 35.635082, -88.817444 35.63507, -88.81694 35.63506, -88.8167 35.63505, -88.81598 35.635033, -88.81574 35.63503, -88.81493 35.635006, -88.81433 35.634987, -88.81283 35.63494, -88.81266 35.634933, -88.81214 35.63492, -88.811966 35.634914, -88.811714 35.634907, -88.81141 35.634895, -88.81095 35.63488, -88.8107 35.634872, -88.81032 35.634857, -88.809715 35.63484, -88.80956 35.63483, -88.80926 35.634804, -88.80917 35.6348, -88.80905 35.6348, -88.80886 35.634804, -88.80883 35.634796, -88.80879 35.634785, -88.808784 35.634796, -88.808754 35.63483, -88.80875 35.634842, -88.808716 35.63484, -88.808685 35.634834, -88.80863 35.63483, -88.8086 35.634834, -88.80859 35.63484, -88.80853 35.634853, -88.80818 35.634895, -88.808075 35.63489, -88.807846 35.634872, -88.80768 35.634857, -88.80703 35.63481, -88.80671 35.63478, -88.80582 35.634716, -88.80534 35.63469, -88.80489 35.634655, -88.80418 35.6346, -88.803986 35.63458, -88.80396 35.634575, -88.80422 35.63406, -88.804924 35.63267, -88.80507 35.63241, -88.80499 35.63239, -88.80497 35.63238, -88.80498 35.632355, -88.80527 35.632156, -88.80547 35.63201, -88.8057 35.631847, -88.80605 35.631554, -88.806366 35.631268, -88.80663 35.631012, -88.80675 35.630894, -88.80685 35.63078, -88.807106 35.630463, -88.80732 35.63018, -88.807785 35.6295, -88.808304 35.628727, -88.808815 35.627968, -88.808975 35.627743, -88.809 35.62774, -88.809074 35.62774, -88.8091 35.62774, -88.809525 35.627766, -88.809784 35.62778, -88.81036 35.627823, -88.810905 35.627872, -88.81174 35.62795, -88.81181 35.62796, -88.81184 35.627968, -88.81197 35.628002, -88.812096 35.628025, -88.81252 35.628056, -88.81268 35.62806, -88.81271 35.628063, -88.81277 35.628063, -88.81281 35.628067, -88.81286 35.62807, -88.81303 35.628056, -88.813156 35.628033, -88.81332 35.62801, -88.813385 35.628, -88.81343 35.62799, -88.81354 35.62798, -88.81358 35.62798, -88.813614 35.627975, -88.813644 35.627975, -88.81386 35.62798, -88.81387 35.62798, -88.81442 35.628, -88.81471 35.62801, -88.81557 35.62804, -88.81684 35.628082, -88.81705 35.62809, -88.81768 35.628113, -88.81777 35.628117, -88.817894 35.628117, -88.81807 35.628113, -88.81837 35.628105, -88.81862 35.62811, -88.8188 35.62811, -88.819 35.62811, -88.81915 35.628113, -88.820206 35.628136, -88.82056 35.628143, -88.82081 35.628147, -88.82155 35.62816, -88.82179 35.628162, -88.822044 35.628166, -88.82279 35.62818, -88.823044 35.62819, -88.82329 35.62819, -88.82345 35.628193, -88.824005 35.628204, -88.824165 35.62821, -88.82424 35.628193, -88.824295 35.628178, -88.824326 35.628174, -88.82643 35.628273, -88.826385 35.629)))
##   Black or African American Alone Percent White Alone Percent
## 1                                  0.7416              0.1990
## 2                                  0.8371              0.1113
## 3                                  0.0151              0.8810
## 4                                  0.9622              0.0111
## 5                                  0.0268              0.8820
## 6                                  0.5325              0.4103
##   American Indian and Alaska Native Alone Percent Asian Alone Percent
## 1                                          0.0028              0.0042
## 2                                          0.0033              0.0040
## 3                                          0.0079              0.0172
## 4                                          0.0015              0.0000
## 5                                          0.0033              0.0199
## 6                                          0.0000              0.0016
##   Native Hawaiian and Other Pacific Islander Alone Percent
## 1                                                   0.0000
## 2                                                   0.0000
## 3                                                   0.0002
## 4                                                   0.0000
## 5                                                   0.0000
## 6                                                   0.0011
##   Some Other Race Alone Percent Two or More Races Percent
## 1                        0.0222                    0.0303
## 2                        0.0150                    0.0293
## 3                        0.0256                    0.0530
## 4                        0.0022                    0.0230
## 5                        0.0152                    0.0528
## 6                        0.0098                    0.0447
##   Hispanic or Latino Percent Not Hispanic or Latino Percent STATE_FIP
## 1                     0.0322                         0.9678        47
## 2                     0.0270                         0.9730        47
## 3                     0.0552                         0.9448        47
## 4                     0.0119                         0.9881        47
## 5                     0.0362                         0.9638        47
## 6                     0.0295                         0.9705        47
##   COUNTY_FIP Median Income Median Income Male Median Income Female
## 1        065         16360              17588                15394
## 2        065         16360              17588                15394
## 3        065         16360              17588                15394
## 4        065         16360              17588                15394
## 5        065         35261              50172                29048
## 6        065         35261              50172                29048
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          geom
## 1   POLYGON ((-85.297859 35.050803, -85.297517 35.050962, -85.294737 35.052119999999995, -85.288797 35.052296999999996, -85.287407 35.052855, -85.285236 35.054224999999995, -85.277542 35.057095, -85.27574899999999 35.058548, -85.271298 35.056262, -85.270144 35.055761, -85.26898899999999 35.055588, -85.27054799999999 35.054656, -85.26574699999999 35.052475, -85.26173399999999 35.050976, -85.263077 35.04855, -85.263244 35.046558, -85.264579 35.043529, -85.267066 35.039041, -85.26922499999999 35.039871, -85.271985 35.040877, -85.286733 35.046303, -85.286887 35.046389, -85.288721 35.045988, -85.291009 35.046856999999996, -85.293617 35.047824999999996, -85.29312999999999 35.048738, -85.29604499999999 35.050125, -85.296266 35.050188999999996, -85.297615 35.050699, -85.298029 35.050759, -85.297859 35.050803))
## 2   POLYGON ((-85.297859 35.050803, -85.297517 35.050962, -85.294737 35.052119999999995, -85.288797 35.052296999999996, -85.287407 35.052855, -85.285236 35.054224999999995, -85.277542 35.057095, -85.27574899999999 35.058548, -85.271298 35.056262, -85.270144 35.055761, -85.26898899999999 35.055588, -85.27054799999999 35.054656, -85.26574699999999 35.052475, -85.26173399999999 35.050976, -85.263077 35.04855, -85.263244 35.046558, -85.264579 35.043529, -85.267066 35.039041, -85.26922499999999 35.039871, -85.271985 35.040877, -85.286733 35.046303, -85.286887 35.046389, -85.288721 35.045988, -85.291009 35.046856999999996, -85.293617 35.047824999999996, -85.29312999999999 35.048738, -85.29604499999999 35.050125, -85.296266 35.050188999999996, -85.297615 35.050699, -85.298029 35.050759, -85.297859 35.050803))
## 3   POLYGON ((-85.297859 35.050803, -85.297517 35.050962, -85.294737 35.052119999999995, -85.288797 35.052296999999996, -85.287407 35.052855, -85.285236 35.054224999999995, -85.277542 35.057095, -85.27574899999999 35.058548, -85.271298 35.056262, -85.270144 35.055761, -85.26898899999999 35.055588, -85.27054799999999 35.054656, -85.26574699999999 35.052475, -85.26173399999999 35.050976, -85.263077 35.04855, -85.263244 35.046558, -85.264579 35.043529, -85.267066 35.039041, -85.26922499999999 35.039871, -85.271985 35.040877, -85.286733 35.046303, -85.286887 35.046389, -85.288721 35.045988, -85.291009 35.046856999999996, -85.293617 35.047824999999996, -85.29312999999999 35.048738, -85.29604499999999 35.050125, -85.296266 35.050188999999996, -85.297615 35.050699, -85.298029 35.050759, -85.297859 35.050803))
## 4   POLYGON ((-85.297859 35.050803, -85.297517 35.050962, -85.294737 35.052119999999995, -85.288797 35.052296999999996, -85.287407 35.052855, -85.285236 35.054224999999995, -85.277542 35.057095, -85.27574899999999 35.058548, -85.271298 35.056262, -85.270144 35.055761, -85.26898899999999 35.055588, -85.27054799999999 35.054656, -85.26574699999999 35.052475, -85.26173399999999 35.050976, -85.263077 35.04855, -85.263244 35.046558, -85.264579 35.043529, -85.267066 35.039041, -85.26922499999999 35.039871, -85.271985 35.040877, -85.286733 35.046303, -85.286887 35.046389, -85.288721 35.045988, -85.291009 35.046856999999996, -85.293617 35.047824999999996, -85.29312999999999 35.048738, -85.29604499999999 35.050125, -85.296266 35.050188999999996, -85.297615 35.050699, -85.298029 35.050759, -85.297859 35.050803))
## 5 POLYGON ((-85.308515 35.062552, -85.308515 35.062643, -85.309058 35.065413, -85.308679 35.071244, -85.307913 35.071951, -85.306185 35.07281, -85.304405 35.075759999999995, -85.301976 35.077655, -85.30068899999999 35.077225999999996, -85.300151 35.076139999999995, -85.300161 35.073150999999996, -85.299769 35.072817, -85.29659099999999 35.071867, -85.294913 35.068183, -85.294949 35.066486999999995, -85.293039 35.065709, -85.292656 35.06494, -85.28965199999999 35.065906999999996, -85.287048 35.065722, -85.285732 35.060871999999996, -85.286501 35.058415, -85.283993 35.057666, -85.285619 35.056745, -85.28876799999999 35.055786999999995, -85.295484 35.055648, -85.296787 35.056307, -85.302534 35.057368, -85.30554099999999 35.057699, -85.307256 35.058321, -85.309283 35.058513999999995, -85.308515 35.062552))
## 6 POLYGON ((-85.308515 35.062552, -85.308515 35.062643, -85.309058 35.065413, -85.308679 35.071244, -85.307913 35.071951, -85.306185 35.07281, -85.304405 35.075759999999995, -85.301976 35.077655, -85.30068899999999 35.077225999999996, -85.300151 35.076139999999995, -85.300161 35.073150999999996, -85.299769 35.072817, -85.29659099999999 35.071867, -85.294913 35.068183, -85.294949 35.066486999999995, -85.293039 35.065709, -85.292656 35.06494, -85.28965199999999 35.065906999999996, -85.287048 35.065722, -85.285732 35.060871999999996, -85.286501 35.058415, -85.283993 35.057666, -85.285619 35.056745, -85.28876799999999 35.055786999999995, -85.295484 35.055648, -85.296787 35.056307, -85.302534 35.057368, -85.30554099999999 35.057699, -85.307256 35.058321, -85.309283 35.058513999999995, -85.308515 35.062552))

Make shape file for Census Population

## 
censusPopShp <- read_sf("Census 2020 Tract Populations/geo_export_6ea9b8b9-f93b-41bd-8242-39b59cd81ddc.shp")
head(censusPopShp)
## Simple feature collection with 6 features and 25 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: -86.66377 ymin: 35.53276 xmax: -83.82455 ymax: 36.01498
## Geodetic CRS:  WGS84(DD)
## # A tibble: 6 x 26
##   state_fips county_fip census_tra geoid       common_nam  total_popu population
##   <chr>      <chr>      <chr>      <chr>       <chr>            <dbl>      <dbl>
## 1 47         175        925200     47175925200 Census Tra~       3095       3009
## 2 47         175        925000     47175925000 Census Tra~       3073       2931
## 3 47         003        950201     47003950201 Census Tra~       3368       3199
## 4 47         003        950202     47003950202 Census Tra~       3991       3844
## 5 47         093        003300     47093003300 Census Tra~       2147       2021
## 6 47         093        002100     47093002100 Census Tra~       2857       2612
## # ... with 19 more variables: white_alon <dbl>, black_or_a <dbl>,
## #   american_i <dbl>, asian_alon <dbl>, native_haw <dbl>, some_other <dbl>,
## #   populati_2 <dbl>, hispanic_o <dbl>, not_hispan <dbl>, black_or_2 <dbl>,
## #   white_al_2 <dbl>, american_2 <dbl>, asian_al_2 <dbl>, native_h_2 <dbl>,
## #   some_oth_2 <dbl>, two_or_mor <dbl>, hispanic_2 <dbl>, not_hisp_2 <dbl>,
## #   geometry <MULTIPOLYGON [°]>

Make shape file for 2017 Median Income

## 
censusIncShp <- read_sf("2020 Median Income/geo_export_43a087a5-8ff8-4733-9a99-dd658a9c17f4.shp")

censusIncShp <- censusIncShp %>%
  rename(tract = tract_id)

head(censusIncShp)
## Simple feature collection with 6 features and 6 fields
## Geometry type: POLYGON
## Dimension:     XY
## Bounding box:  xmin: -85.30035 ymin: 34.9848 xmax: -85.16977 ymax: 35.15406
## Geodetic CRS:  WGS84(DD)
## # A tibble: 6 x 7
##   state_fip county_fip tract  median_inc median_i_2 median_i_3
##   <chr>     <chr>      <chr>       <dbl>      <dbl>      <dbl>
## 1 47        065        001300      17175      19924      15556
## 2 47        065        000400      16360      17588      15394
## 3 47        065        010502      27248      37325      18496
## 4 47        065        002400      15523      15567      15480
## 5 47        065        010432      40555      55556      30070
## 6 47        065        011600      22442      24060      17337
## # ... with 1 more variable: geometry <POLYGON [°]>

Merge our Shape Files to one big shape file

## 
sf::sf_use_s2(FALSE)
## Spherical geometry (s2) switched off
censusDataShp <- st_join(censusIncShp, censusPopShp)
## although coordinates are longitude/latitude, st_intersects assumes that they are planar
head(censusDataShp)
## Simple feature collection with 6 features and 31 fields
## Geometry type: POLYGON
## Dimension:     XY
## Bounding box:  xmin: -85.27716 ymin: 35.02097 xmax: -85.25746 ymax: 35.03486
## Geodetic CRS:  WGS84(DD)
## # A tibble: 6 x 32
##   state_fip county_fip.x tract  median_inc median_i_2 median_i_3
##   <chr>     <chr>        <chr>       <dbl>      <dbl>      <dbl>
## 1 47        065          001300      17175      19924      15556
## 2 47        065          001300      17175      19924      15556
## 3 47        065          001300      17175      19924      15556
## 4 47        065          001300      17175      19924      15556
## 5 47        065          001300      17175      19924      15556
## 6 47        065          001300      17175      19924      15556
## # ... with 26 more variables: geometry <POLYGON [°]>, state_fips <chr>,
## #   county_fip.y <chr>, census_tra <chr>, geoid <chr>, common_nam <chr>,
## #   total_popu <dbl>, population <dbl>, white_alon <dbl>, black_or_a <dbl>,
## #   american_i <dbl>, asian_alon <dbl>, native_haw <dbl>, some_other <dbl>,
## #   populati_2 <dbl>, hispanic_o <dbl>, not_hispan <dbl>, black_or_2 <dbl>,
## #   white_al_2 <dbl>, american_2 <dbl>, asian_al_2 <dbl>, native_h_2 <dbl>,
## #   some_oth_2 <dbl>, two_or_mor <dbl>, hispanic_2 <dbl>, not_hisp_2 <dbl>
plot(censusDataShp, max.plot = 31)

censusDataShp[is.na(censusDataShp)] <- 0

Plot our median Income by tract geometries

## 

income_plot <- ggplot() +
  geom_sf(data = censusDataShp, aes(fill=censusDataShp$median_inc)) +
  theme_classic() +
  theme_dark() + 
  labs(title = "Median Income for Chattanooga Tracts", fill = "Median Income")

ggplotly(income_plot)
## Warning: Use of `censusDataShp$median_inc` is discouraged. Use `median_inc`
## instead.

START OF MILESTONE 2 —————————————————————————————————————————————————–

Make Plot for population:

## Make Plot for population:
population_plot <- ggplot() +
  geom_sf(data = censusDataShp, aes(fill=censusDataShp$total_popu)) +
  theme_classic() +
  theme_dark() + 
  labs(title = "Population for Chattanooga Tracts", fill = "Total Population")

ggplotly(population_plot)
## Warning: Use of `censusDataShp$total_popu` is discouraged. Use `total_popu`
## instead.

Remove the Time Stamps from the Date Incidents

##
police_incident$Date_Incident <- str_sub(police_incident$Date_Incident, 1, nchar(police_incident$Date_Incident)-12)

head(police_incident)
## # A tibble: 6 x 19
##   Address      City  State Zip   Date_Incident Jurisdiction Incident_Tract Zone 
##   <chr>        <chr> <chr> <chr> <chr>         <chr>        <chr>          <chr>
## 1 1200 BROAD ~ Chat~ TN    3740~ 01/01/2015    TN0330100    A9             Adam~
## 2 500 W 12TH ~ Chat~ TN    3740~ 01/01/2015    TN0330100    A6             Adam~
## 3 1000 Sherid~ Chat~ TN    3740~ 01/01/2015    TN0330100    B3             Bake~
## 4 1600 OAK ST  Chat~ TN    3740~ 01/01/2015    TN0330100    B4             Bake~
## 5 4000 Blanch~ Chat~ TN    3741~ 01/01/2015    TN0330100    C2             Char~
## 6 8300 Grinde~ CHAT~ TN    3742~ 01/01/2015    TN0330100    C7             Char~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>

Make Incident Dates date type

##
police_incident$Date_Incident <- as.Date(police_incident$Date_Incident, format = "%m/%d/%Y")

head(police_incident)
## # A tibble: 6 x 19
##   Address      City  State Zip   Date_Incident Jurisdiction Incident_Tract Zone 
##   <chr>        <chr> <chr> <chr> <date>        <chr>        <chr>          <chr>
## 1 1200 BROAD ~ Chat~ TN    3740~ 2015-01-01    TN0330100    A9             Adam~
## 2 500 W 12TH ~ Chat~ TN    3740~ 2015-01-01    TN0330100    A6             Adam~
## 3 1000 Sherid~ Chat~ TN    3740~ 2015-01-01    TN0330100    B3             Bake~
## 4 1600 OAK ST  Chat~ TN    3740~ 2015-01-01    TN0330100    B4             Bake~
## 5 4000 Blanch~ Chat~ TN    3741~ 2015-01-01    TN0330100    C2             Char~
## 6 8300 Grinde~ CHAT~ TN    3742~ 2015-01-01    TN0330100    C7             Char~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>

Plot number of incidents by date

#
police_incident_by_date <- police_incident %>% group_by(Date_Incident) %>% summarise(frequency = n())

p <- ggplot(police_incident_by_date, aes(x = police_incident_by_date$Date_Incident, y = police_incident_by_date$frequency)) + geom_col(fill="#BE93D4") + geom_smooth() + xlab("Year") + ylab("Number of Incident") + labs(title = "Police incident by Date")

ggplotly(p)
## Warning: Use of `police_incident_by_date$Date_Incident` is discouraged. Use
## `Date_Incident` instead.
## Warning: Use of `police_incident_by_date$frequency` is discouraged. Use
## `frequency` instead.
## Warning: Use of `police_incident_by_date$Date_Incident` is discouraged. Use
## `Date_Incident` instead.
## Warning: Use of `police_incident_by_date$frequency` is discouraged. Use
## `frequency` instead.
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'

Plot number of incident by month

#
police_incident_by_month <- police_incident_by_date %>% group_by(Date_Incident=floor_date(Date_Incident, "month")) %>%
   summarize(frequency=sum(frequency))

p <- ggplot(police_incident_by_month, aes(x = police_incident_by_month$Date_Incident, y = police_incident_by_month$frequency)) + geom_col(fill="#BE93D4") + geom_smooth() + xlab("Month") + ylab("Number of Incident") + labs(title = "Police Incident by Month")

ggplotly(p)
## Warning: Use of `police_incident_by_month$Date_Incident` is discouraged. Use
## `Date_Incident` instead.
## Warning: Use of `police_incident_by_month$frequency` is discouraged. Use
## `frequency` instead.
## Warning: Use of `police_incident_by_month$Date_Incident` is discouraged. Use
## `Date_Incident` instead.
## Warning: Use of `police_incident_by_month$frequency` is discouraged. Use
## `frequency` instead.
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Plot number of incidents by year

#
police_incident_by_year <- police_incident_by_month %>% group_by(Date_Incident=floor_date(Date_Incident, "year")) %>%
   summarize(frequency=sum(frequency))

p <- ggplot(police_incident_by_year, aes(x = police_incident_by_year$Date_Incident, y = police_incident_by_year$frequency)) + geom_col(fill="#BE93D4") + geom_smooth() + xlab("Year") + ylab("Number of Incident") + labs(title = "Police Incident by Year")

ggplotly(p)
## Warning: Use of `police_incident_by_year$Date_Incident` is discouraged. Use
## `Date_Incident` instead.
## Warning: Use of `police_incident_by_year$frequency` is discouraged. Use
## `frequency` instead.
## Warning: Use of `police_incident_by_year$Date_Incident` is discouraged. Use
## `Date_Incident` instead.
## Warning: Use of `police_incident_by_year$frequency` is discouraged. Use
## `frequency` instead.
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Plot police incident number by incident type

#
police_incident_by_type <- police_incident %>% group_by(Incident_Type) %>% summarise(frequency = n())

police_incident_by_type$Incident_Type <- factor(police_incident_by_type$Incident_Type, levels = unique(police_incident_by_type$Incident_Type)[order(police_incident_by_type$frequency, decreasing = TRUE)])

p <- ggplot(police_incident_by_type, aes(x = police_incident_by_type$Incident_Type, y = police_incident_by_type$frequency)) + geom_col(fill="#BE93D4") + geom_smooth() + xlab("Type") + ylab("Number of Incident") + labs(title = "Police Incident by Incident Type")

ggplotly(p)
## Warning: Use of `police_incident_by_type$Incident_Type` is discouraged. Use
## `Incident_Type` instead.
## Warning: Use of `police_incident_by_type$frequency` is discouraged. Use
## `frequency` instead.
## Warning: Use of `police_incident_by_type$Incident_Type` is discouraged. Use
## `Incident_Type` instead.
## Warning: Use of `police_incident_by_type$frequency` is discouraged. Use
## `frequency` instead.
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Plot police incident number by incident description

#
police_incident_by_description <- police_incident %>% group_by(Incident_Description) %>% summarise(frequency = n())

police_incident_by_description$Incident_Description <- factor(police_incident_by_description$Incident_Description, levels = unique(police_incident_by_description$Incident_Description)[order(police_incident_by_description$frequency, decreasing = TRUE)])

p <- ggplot(police_incident_by_description, aes(x = police_incident_by_description$Incident_Description, y = police_incident_by_description$frequency)) + geom_col(fill="#BE93D4") + xlab("Description") + ylab("Number of Incident") + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +  labs(title = "Police Incident by Incident Description")

ggplotly(p)
## Warning: Use of `police_incident_by_description$Incident_Description` is
## discouraged. Use `Incident_Description` instead.
## Warning: Use of `police_incident_by_description$frequency` is discouraged. Use
## `frequency` instead.

START OF MILESTONE 3 (Part of these are now milestone 5) ———————————————————————————————————————————-

Plot number of incidents by specific month for 2020

#
police_incident_by_month <- police_incident_by_date %>% group_by(Date_Incident=floor_date(Date_Incident, "month")) %>% summarize(frequency=sum(frequency)) 

police_incident_by_month_spec <- police_incident_by_month[police_incident_by_month$Date_Incident >= "2020-01-01" & police_incident_by_month$Date_Incident <= "2020-12-31",]


p <- ggplot(police_incident_by_month_spec, aes(x = police_incident_by_month_spec$Date_Incident, y = police_incident_by_month_spec$frequency)) + geom_col(fill="#BE93D4") + geom_smooth() + xlab("Month") + ylab("Number of Incident") + labs(title = "Police Incident for 2020 aggregated by Month")

ggplotly(p)
## Warning: Use of `police_incident_by_month_spec$Date_Incident` is discouraged.
## Use `Date_Incident` instead.
## Warning: Use of `police_incident_by_month_spec$frequency` is discouraged. Use
## `frequency` instead.
## Warning: Use of `police_incident_by_month_spec$Date_Incident` is discouraged.
## Use `Date_Incident` instead.
## Warning: Use of `police_incident_by_month_spec$frequency` is discouraged. Use
## `frequency` instead.
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Make a 2020 Police incident dataframe

##
police_incident_2020 <- police_incident[police_incident$Date_Incident >= "2020-01-01" & police_incident$Date_Incident <= "2020-12-31",]

head(police_incident_2020)
## # A tibble: 6 x 19
##   Address    City    State Zip   Date_Incident Jurisdiction Incident_Tract Zone 
##   <chr>      <chr>   <chr> <chr> <date>        <chr>        <chr>          <chr>
## 1 7900 Chia~ Chatta~ TN    37421 2020-01-01    TN0330100    C9             Char~
## 2 800 Pine ~ Chatta~ TN    37402 2020-01-01    TN0330100    A7             Adam~
## 3 3800 Hixs~ Chatta~ TN    37343 2020-01-01    TN0330100    A1             Adam~
## 4 2200 E 26~ Chatta~ TN    37407 2020-01-01    TN0330100    B8             Bake~
## 5 100 Valle~ Chatta~ TN    37343 2020-01-01    TN0330100    A1             Adam~
## 6 1300 E 36~ Chatta~ TN    37407 2020-01-01    TN0330100    B7             Bake~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>

Refine Data Frame to Just show May (Highest Crime cases)

##
pi_may_2020 <-  police_incident[police_incident$Date_Incident >= "2020-05-01" & police_incident$Date_Incident <= "2020-05-31",]

head(pi_may_2020)
## # A tibble: 6 x 19
##   Address    City   State Zip   Date_Incident Jurisdiction Incident_Tract Zone  
##   <chr>      <chr>  <chr> <chr> <date>        <chr>        <chr>          <chr> 
## 1 1500 Ely ~ Chatt~ TN    37343 2020-05-01    TN0330100    A3             Adam N
## 2 700 Moore~ Chatt~ TN    37411 2020-05-01    TN0330100    C2             Charl~
## 3 4600 Sunf~ Chatt~ TN    37416 2020-05-01    TN0330100    C5             Charl~
## 4 4300 Shaw~ Chatt~ TN    37411 2020-05-01    TN0330100    C2             Charl~
## 5 2300 E 5t~ Chatt~ TN    37404 2020-05-01    TN0330100    B4             Baker~
## 6 1500 Join~ Chatt~ TN    37421 2020-05-01    TN0330100    C8             Charl~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>

Make plotly plot for police incidents in the month of May 2020 by incident types (Milestone 5)

## 
inc_map_may_2020 <- ggplot() +
  geom_sf(data = censusDataShp, aes()) +
  geom_point(data = pi_may_2020, aes(x=pi_may_2020$Longitude, y=pi_may_2020$Latitude, color=pi_may_2020$Incident_Type))  + labs(title="Location of Police Inicidents in May of 2020", x="Longitude", y= "Latitude", color="Incident Type") +theme(legend.position="bottom")

ggplotly(inc_map_may_2020)
## Warning: Use of `pi_may_2020$Longitude` is discouraged. Use `Longitude` instead.
## Warning: Use of `pi_may_2020$Latitude` is discouraged. Use `Latitude` instead.
## Warning: Use of `pi_may_2020$Incident_Type` is discouraged. Use `Incident_Type`
## instead.

Refine DataFrame to show only part one crimes in may 2020

##
pi_type1_crimes_2020 <- pi_may_2020 %>% filter(pi_may_2020$Incident_Type == "Part 1 Crimes")

Make Plotly plot for all part one police incidents in the month of may in 2020 (Milestone 5)

## 
p1_may_map <- ggplot() +
  geom_sf(data = censusDataShp, aes()) +
  geom_point(data = pi_type1_crimes_2020, aes(x=pi_type1_crimes_2020$Longitude, y=pi_type1_crimes_2020$Latitude, color=pi_type1_crimes_2020$Incident_Description)) + labs(title="Location of Part 1 Police Inicidents in May of 2020", x="Longitude", y= "Latitude", color="Incident Description") +theme(legend.position="bottom")


ggplotly(p1_may_map)
## Warning: Use of `pi_type1_crimes_2020$Longitude` is discouraged. Use `Longitude`
## instead.
## Warning: Use of `pi_type1_crimes_2020$Latitude` is discouraged. Use `Latitude`
## instead.
## Warning: Use of `pi_type1_crimes_2020$Incident_Description` is discouraged. Use
## `Incident_Description` instead.

Refine DataFrame to show only robbery crimes in may 2020

##
p1_Crimes_may_2020_robbery <- pi_may_2020 %>% filter(pi_may_2020$Incident_Description == "Robbery")

head(p1_Crimes_may_2020_robbery)
## # A tibble: 6 x 19
##   Address    City    State Zip   Date_Incident Jurisdiction Incident_Tract Zone 
##   <chr>      <chr>   <chr> <chr> <date>        <chr>        <chr>          <chr>
## 1 3500 Brai~ Chatta~ TN    37411 2020-05-01    TN0330100    C2             Char~
## 2 5100 Hwy ~ Chatta~ TN    37343 2020-05-03    TN0330100    A2             Adam~
## 3 6300 Stoc~ Chatta~ TN    37416 2020-05-04    TN0330100    C5             Char~
## 4 3200 12th~ Chatta~ TN    37407 2020-05-04    TN0330100    B8             Bake~
## 5 7600 E Br~ Chatta~ TN    37421 2020-05-06    TN0330100    C8             Char~
## 6 7000 Mccu~ Chatta~ TN    37421 2020-05-08    TN0330100    C9             Char~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>

Make Plotly Plot to show where robberies occured in May 2020 (Milestone 5)

## 
p1_may_map_robbery <- ggplot() +
  geom_sf(data = censusDataShp, aes()) +
  geom_point(data = p1_Crimes_may_2020_robbery, aes(x=p1_Crimes_may_2020_robbery$Longitude, y=p1_Crimes_may_2020_robbery$Latitude, color=p1_Crimes_may_2020_robbery$Incident_Description)) + labs(title="Location of Robberies in May of 2020", x="Longitude", y= "Latitude", color="Incident Type")


ggplotly(p1_may_map_robbery)
## Warning: Use of `p1_Crimes_may_2020_robbery$Longitude` is discouraged. Use
## `Longitude` instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Latitude` is discouraged. Use
## `Latitude` instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Incident_Description` is
## discouraged. Use `Incident_Description` instead.

Start of Milestone 4 ————————————————————————————————————————————————————————

Make a plot overlaying the shapefile population data with the amounts of Part one crimes

##
p <- ggplot() +
  geom_sf(data = censusDataShp, aes(fill=censusDataShp$total_popu)) +
  geom_point(data = p1_Crimes_may_2020_robbery, aes(x=p1_Crimes_may_2020_robbery$Longitude, y=p1_Crimes_may_2020_robbery$Latitude, color=p1_Crimes_may_2020_robbery$Incident_Description)) + labs(title="Location of Robberies in May of 2020", x="Longitude", y= "Latitude", color="Incident Type", fill= "Population")

ggplotly(p)
## Warning: Use of `censusDataShp$total_popu` is discouraged. Use `total_popu`
## instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Longitude` is discouraged. Use
## `Longitude` instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Latitude` is discouraged. Use
## `Latitude` instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Incident_Description` is
## discouraged. Use `Incident_Description` instead.

Make a plot overlaying the shapefile income data with the amounts of Part one crimes

##
p <- ggplot() +
  geom_sf(data = censusDataShp, aes(fill=censusDataShp$median_inc)) +
  geom_point(data = p1_Crimes_may_2020_robbery, aes(x=p1_Crimes_may_2020_robbery$Longitude, y=p1_Crimes_may_2020_robbery$Latitude, color=p1_Crimes_may_2020_robbery$Incident_Description)) + labs(title="Location of Robberies in May of 2020", x="Longitude", y= "Latitude", color="Incident Type", fill= "Median Income")

ggplotly(p)
## Warning: Use of `censusDataShp$median_inc` is discouraged. Use `median_inc`
## instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Longitude` is discouraged. Use
## `Longitude` instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Latitude` is discouraged. Use
## `Latitude` instead.
## Warning: Use of `p1_Crimes_may_2020_robbery$Incident_Description` is
## discouraged. Use `Incident_Description` instead.

Make new dataframe for p1_Crimes_may_2020_shoplifting

##
#Shoplifting

p1_Crimes_may_2020_shoplifting <- pi_may_2020 %>% filter(pi_may_2020$Incident_Description == "Shoplifting")

head(p1_Crimes_may_2020_shoplifting)
## # A tibble: 6 x 19
##   Address    City    State Zip   Date_Incident Jurisdiction Incident_Tract Zone 
##   <chr>      <chr>   <chr> <chr> <date>        <chr>        <chr>          <chr>
## 1 400 Green~ Chatta~ TN    37411 2020-05-01    TN0330100    C3             Char~
## 2 3500 Cumm~ Chatta~ TN    37419 2020-05-01    TN0330100    A13            Adam~
## 3 2000 Mcca~ Chatta~ TN    37404 2020-05-01    TN0330100    B5             Bake~
## 4 1300 E 3r~ Chatta~ TN    37404 2020-05-02    TN0330100    B4             Bake~
## 5 5900 High~ Chatta~ TN    37343 2020-05-02    TN0330100    A1             Adam~
## 6 1300 E 3r~ Chatta~ TN    37404 2020-05-02    TN0330100    B4             Bake~
## # ... with 11 more variables: UCR_Incident_Code <chr>,
## #   Incident_Description <chr>, Incident_Type <chr>, Case_Number <chr>,
## #   Case_Status <chr>, Case_Status_Description <chr>, Latitude <dbl>,
## #   Neighborhood <chr>, Longitude <dbl>, Location <chr>, citydst <dbl>
#combined dataframe for robbery and shoplifting
p1_shoplift_robbery <-  rbind(p1_Crimes_may_2020_robbery,p1_Crimes_may_2020_shoplifting)

Plot for location of Robberies and shoplifting incidents based with median income (Milestone 5)

## 
p <- ggplot() + geom_sf(data = censusDataShp, aes(fill=censusDataShp$median_inc)) +
  geom_point(data = p1_shoplift_robbery, aes(x=p1_shoplift_robbery$Longitude, y=p1_shoplift_robbery$Latitude, color= p1_shoplift_robbery$Incident_Description))+
 labs(title="Location of Robberies and Shoplifting incidents in May of 2020", x="Longitude", y= "Latitude", color="Incident Description", fill= "Median Income")


ggplotly(p)
## Warning: Use of `censusDataShp$median_inc` is discouraged. Use `median_inc`
## instead.
## Warning: Use of `p1_shoplift_robbery$Longitude` is discouraged. Use `Longitude`
## instead.
## Warning: Use of `p1_shoplift_robbery$Latitude` is discouraged. Use `Latitude`
## instead.
## Warning: Use of `p1_shoplift_robbery$Incident_Description` is discouraged. Use
## `Incident_Description` instead.

Graph Showing Locations of Robberies and Shoplifting based on population density (Milestone 5)

##Graph Showing Locations of Robberies and Shoplifting based on population density (Milestone 5)
p <- ggplot() +
  geom_sf(data = censusDataShp, aes(fill=censusDataShp$total_popu)) +
  geom_point(data = p1_shoplift_robbery, aes(x=p1_shoplift_robbery$Longitude, y=p1_shoplift_robbery$Latitude, color= p1_shoplift_robbery$Incident_Description))+
 labs(title="Location of Robberies and Shoplifting incidents in May of 2020", x="Longitude", y= "Latitude", color="Incident Description", fill= "Population")


ggplotly(p)
## Warning: Use of `censusDataShp$total_popu` is discouraged. Use `total_popu`
## instead.
## Warning: Use of `p1_shoplift_robbery$Longitude` is discouraged. Use `Longitude`
## instead.
## Warning: Use of `p1_shoplift_robbery$Latitude` is discouraged. Use `Latitude`
## instead.
## Warning: Use of `p1_shoplift_robbery$Incident_Description` is discouraged. Use
## `Incident_Description` instead.